#ifndef SETTTINGS_H
#define SETTTINGS_H

#include <QDialog>
#include "taskitem.h"
#include <QFileDialog>
#include <QMessageBox>
#include <QSoundEffect>
#include <QComboBox>

#define AUTO_RUN_KEY	"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run"
#define AUTO_RUN_BAT    "autoRun.bat"

namespace Ui {
class Setttings;
}

using sPairVector = QVector<QPair<QString, QString>>;
using sPair = QPair<QString, QString>;


class Settings : public QDialog
{
    Q_OBJECT
public:
    QString m_bell_music_path;
    QString m_default_bell_music_path;

    // 计时器到期提示音
    QSoundEffect *m_timer_end_effect;


public:
    explicit Settings(QWidget *parent = nullptr);
    ~Settings();


    void loadBellMusic();
    bool checkDirExist(QString fullPath);
    sPairVector* getFileListUnderDir(QString dirName, QString type);


    void bellChanged();

    static void setAppAutoRun(bool isStart);
    static QString checkAutoRunBat();

    bool isAppAutoRun();



private slots:
    void on_pushButton_clicked();

    void on_pushButton_2_clicked();

    void on_import_bell_clicked();


private:
    Ui::Setttings *ui;

signals:
    void doSettings();
};

#endif // SETTTINGS_H
